The present application relates generally to an improved data processing apparatus and method and more specifically to mechanisms for offloading input/output (I/O) completion operations.
Input/output (I/O) operations are computer operations sent from a processor or central processing unit (CPU) in a data processing system to an I/O or peripheral device, which may be either internal or external to the data processing system. External I/O devices may be devices such as a mouse, keyboard, printer, monitor, external Zip drive, or scanner and internal I/O devices may be devices such as CD-ROM drive, CD-R drive, internal modem, or the like. Input/output (I/O) operations may be extremely slow compared to the processing of data. Therefore, once a processor issues an I/O operation, the processor continues with other operations until the I/O device returns an I/O response to the I/O operation.
In order for each I/O operation to complete, the processor must address the I/O response from the I/O device. However, currently I/O response processing is delayed by the processor, while the processor to which the I/O response is associated with is busy with higher priority work. That is, I/O operations do not always have a highest priority when it comes to all computer operations. Thus, when an I/O response is received, the I/O response may be queued until such time that the processor is not processing an operation with a higher priority than the I/O response.
A typical strategy for I/O response processing is that once I/O device has completed a request, the I/O device requests attention from the processor that requested the I/O operation via a hardware interrupt. It is always desirable to acknowledge an interrupt as quickly as possible, because a processor cannot handle additional interrupts until the current interrupt is acknowledged by resetting an end of interrupt (EOI) line. For this reason, a processor typically performs only a minimal amount of work before the EOI. This work would be determining the nature of the interrupt, the type of interrupt, priority of work needed, and scheduling the work. The work that is scheduled in response to an interrupt is said to run at “interrupt priority.” Interrupt priority is actually a generic term for a set of relative priorities all of which are favored over a processor's normal work, but may vary in relative priority. I/O response processing is typically given a medium to low interrupt priority. This means that I/O responses will be addressed before any non-interrupt priority processes, but will wait behind more favored interrupt priorities. This prioritization of interrupt handling, attempts to prevent lower priority work from languishing by limiting higher priority work to short predictable sequences. Thus, known solutions utilize careful assignments of interrupt priorities to ensure the I/O responses are addressed in a timely fashion.
However, a drawback to the known solutions is that a flurry of higher priority work, or other conditions that may slow hardware response times, may have the effect of preventing I/O responses from running for hundreds of milliseconds or more. These long delays may be interpreted by users as unacceptably sluggish response or by software applications as failures which can cause them to trigger various undesirable responses including shutting down an application.